﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using QuickTest.Core.Threading;

namespace QuickTest.Tests.Threading
{
    [TestFixture]
    public class FireAndForgetThreadingProviderTests
    {
        [Test]
        public void Does_not_do_work_if_invoke_is_not_complete()
        {
			var threadingProvider = new FireAndForgetThreadingProvider();

            threadingProvider.DoWork(() => Thread.Sleep(100));

            bool workDone = false;
            threadingProvider.DoWork(() => { workDone = true; });

            Assert.That(workDone, Is.False);
        }
    }
}
